<?php echo $header; ?><?php echo $column_left; ?>
<div id="content">
  <div class="page-header">
    <div class="container-fluid">
      <div class="pull-right">
        <button type="submit" form="form-setting" data-toggle="tooltip" title="<?php echo $button_save; ?>" class="btn btn-primary"><i class="fa fa-save"></i></button>
        <a href="<?php echo $cancel; ?>" data-toggle="tooltip" title="<?php echo $button_cancel; ?>" class="btn btn-default"><i class="fa fa-reply"></i></a></div>
      <h1><?php echo $heading_title; ?></h1>
      <ul class="breadcrumb">
        <?php foreach ($breadcrumbs as $breadcrumb) { ?>
        <li><a href="<?php echo $breadcrumb['href']; ?>"><?php echo $breadcrumb['text']; ?></a></li>
        <?php } ?>
      </ul>
    </div>
  </div>
  <div class="container-fluid">
    <?php if ($error_warning) { ?>
    <div class="alert alert-danger"><i class="fa fa-exclamation-circle"></i> <?php echo $error_warning; ?>
      <button type="button" class="close" data-dismiss="alert">&times;</button>
    </div>
    <?php } ?>
    <?php if ($success) { ?>
    <div class="alert alert-success"><i class="fa fa-check-circle"></i> <?php echo $success; ?>
      <button type="button" class="close" data-dismiss="alert">&times;</button>
    </div>
    <?php } ?>
    <div class="panel panel-default">
      <div class="panel-heading">
        <h3 class="panel-title"><i class="fa fa-pencil"></i> <?php echo $text_edit; ?></h3>
      </div>
      <div class="panel-body">
        <form action="<?php echo $action; ?>" method="post" enctype="multipart/form-data" id="form-setting" class="form-horizontal">
          <ul class="nav nav-tabs">
            <li class="active"><a href="#tab-option" data-toggle="tab"><?php echo $tab_option; ?></a></li>
          </ul>
          <div class="tab-content">

            <div class="tab-pane active" id="tab-option">
              <fieldset>
                <div class="form-group">
                  <label class="col-sm-2 control-label" for="input-icp"><span data-toggle="tooltip" title="<?php echo $help_icp; ?>"><?php echo $entry_icp; ?></span></label>
                  <div class="col-sm-10">
                    <input type="text" name="gdconfig_icp" value="<?php echo $gdconfig_icp; ?>" placeholder="<?php echo $entry_icp; ?>" id="input-icp" class="form-control" />
                  </div>
                </div>
                <div class="form-group">
                  <label class="col-sm-2 control-label" for="input-shipping_custom_field_telephone_id"><span data-toggle="tooltip" title="<?php echo $help_shipping_custom_field_telephone_id; ?>"><?php echo $entry_shipping_custom_field_telephone_id; ?></span></label>
                  <div class="col-sm-10">
                    <select name="gdconfig_shipping_custom_field_telephone_id" id="input-shipping_custom_field_telephone_id" class="form-control">
                      <option value="0"></option>
                      <?php foreach ($custom_fields as $custom_field) { ?>
                      <?php if ($custom_field['custom_field_id'] == $gdconfig_shipping_custom_field_telephone_id) { ?>
                      <option value="<?php echo $custom_field['custom_field_id']; ?>" selected="selected"><?php echo $custom_field['name']; ?></option>
                      <?php } else { ?>
                      <option value="<?php echo $custom_field['custom_field_id']; ?>"><?php echo $custom_field['name']; ?></option>
                      <?php } ?>
                      <?php } ?>
                    </select>
                  </div>
                </div>
                <div class="form-group">
                  <label class="col-sm-2 control-label" for="input-admin_telephone"><span data-toggle="tooltip"><?php echo $entry_admin_telephone; ?></span></label>
                  <div class="col-sm-10">
                    <input type="text" name="gdconfig_admin_telephone" value="<?php echo $gdconfig_admin_telephone; ?>" placeholder="<?php echo $entry_admin_telephone; ?>"  id="input-admin_telephone" class="form-control"/>
                  </div>
                </div>
                <div class="form-group">
                  <label class="col-sm-2 control-label" for="input-pc-payment"><span data-toggle="tooltip" title="<?php echo $help_pc_payment; ?>"><?php echo $entry_pc_payment; ?></span></label>
                  <div class="col-sm-10">
                    <div class="well well-sm" style="height: 150px; overflow: auto;">
                      <?php foreach ($payments as $payment) { ?>
                      <div class="checkbox">
                        <label>
                          <?php if (in_array($payment['code'], $gdconfig_pc_payment)) { ?>
                          <input type="checkbox" name="gdconfig_pc_payment[]" value="<?php echo $payment['code']; ?>" checked="checked" />
                          <?php echo $payment['title']; ?>
                          <?php } else { ?>
                          <input type="checkbox" name="gdconfig_pc_payment[]" value="<?php echo $payment['code']; ?>" />
                          <?php echo $payment['title']; ?>
                          <?php } ?>
                        </label>
                      </div>
                      <?php } ?>
                    </div>
                    <?php if ($error_pc_payment) { ?>
                    <div class="text-danger"><?php echo $error_pc_payment; ?></div>
                    <?php } ?>
                  </div>
                </div>
                
                <div class="form-group">
                  <label class="col-sm-2 control-label" for="input-mobile-payment"><span data-toggle="tooltip" title="<?php echo $help_mobile_payment; ?>"><?php echo $entry_mobile_payment; ?></span></label>
                  <div class="col-sm-10">
                    <div class="well well-sm" style="height: 150px; overflow: auto;">
                      <?php foreach ($payments as $payment) { ?>
                      <div class="checkbox">
                        <label>
                          <?php if (in_array($payment['code'], $gdconfig_mobile_payment)) { ?>
                          <input type="checkbox" name="gdconfig_mobile_payment[]" value="<?php echo $payment['code']; ?>" checked="checked" />
                          <?php echo $payment['title']; ?>
                          <?php } else { ?>
                          <input type="checkbox" name="gdconfig_mobile_payment[]" value="<?php echo $payment['code']; ?>" />
                          <?php echo $payment['title']; ?>
                          <?php } ?>
                        </label>
                      </div>
                      <?php } ?>
                    </div>
                    <?php if ($error_mobile_payment) { ?>
                    <div class="text-danger"><?php echo $error_mobile_payment; ?></div>
                    <?php } ?>
                  </div>
                </div>
                
                <div class="form-group">
                  <label class="col-sm-2 control-label" for="input-weixin-payment"><span data-toggle="tooltip" title="<?php echo $help_weixin_payment; ?>"><?php echo $entry_weixin_payment; ?></span></label>
                  <div class="col-sm-10">
                    <div class="well well-sm" style="height: 150px; overflow: auto;">
                      <?php foreach ($payments as $payment) { ?>
                      <div class="checkbox">
                        <label>
                          <?php if (in_array($payment['code'], $gdconfig_weixin_payment)) { ?>
                          <input type="checkbox" name="gdconfig_weixin_payment[]" value="<?php echo $payment['code']; ?>" checked="checked" />
                          <?php echo $payment['title']; ?>
                          <?php } else { ?>
                          <input type="checkbox" name="gdconfig_weixin_payment[]" value="<?php echo $payment['code']; ?>" />
                          <?php echo $payment['title']; ?>
                          <?php } ?>
                        </label>
                      </div>
                      <?php } ?>
                    </div>
                    <?php if ($error_weixin_payment) { ?>
                    <div class="text-danger"><?php echo $error_weixin_payment; ?></div>
                    <?php } ?>
                  </div>
                </div>
                <div class="form-group">
                  <label class="col-sm-2 control-label" for="input-unpaid-status"><span data-toggle="tooltip" title="<?php echo $help_unpaid_status; ?>"><?php echo $entry_unpaid_status; ?></span></label>
                  <div class="col-sm-10">
                    <select name="gdconfig_unpaid_status" id="input-unpaid-status" class="form-control">
                      <?php foreach ($order_statuses as $order_status) { ?>
                      <?php if ($order_status['order_status_id'] == $gdconfig_unpaid_status) { ?>
                      <option value="<?php echo $order_status['order_status_id']; ?>" selected="selected"><?php echo $order_status['name']; ?></option>
                      <?php } else { ?>
                      <option value="<?php echo $order_status['order_status_id']; ?>"><?php echo $order_status['name']; ?></option>
                      <?php } ?>
                      <?php } ?>
                    </select>
                  </div>
                </div>
                <div class="form-group">
                  <label class="col-sm-2 control-label" for="input-paid-status"><span data-toggle="tooltip" title="<?php echo $help_paid_status; ?>"><?php echo $entry_paid_status; ?></span></label>
                  <div class="col-sm-10">
                    <div class="well well-sm" style="height: 150px; overflow: auto;">
                      <?php foreach ($order_statuses as $order_status) { ?>
                      <div class="checkbox">
                        <label>
                          <?php if (in_array($order_status['order_status_id'], $gdconfig_paid_status)) { ?>
                          <input type="checkbox" name="gdconfig_paid_status[]" value="<?php echo $order_status['order_status_id']; ?>" checked="checked" />
                          <?php echo $order_status['name']; ?>
                          <?php } else { ?>
                          <input type="checkbox" name="gdconfig_paid_status[]" value="<?php echo $order_status['order_status_id']; ?>" />
                          <?php echo $order_status['name']; ?>
                          <?php } ?>
                        </label>
                      </div>
                      <?php } ?>
                    </div>
                    <?php if ($error_paid_status) { ?>
                    <div class="text-danger"><?php echo $error_paid_status; ?></div>
                    <?php } ?>
                  </div>
                </div>
                <div class="form-group">
                  <label class="col-sm-2 control-label" for="input-country-status"><span data-toggle="tooltip" title="<?php echo $help_country_status; ?>"><?php echo $entry_country_status; ?></span></label>
                  <div class="col-sm-10">
                    <select name="gdconfig_country_status" id="input-country-status" class="form-control">
                      <?php if($gdconfig_country_status):?>
                        <option value="0"><?php echo $text_disable; ?></option>
                        <option value="1" selected="selected"><?php echo $text_enable; ?></option>
                      <?php else:?>
                        <option value="0" selected="selected"><?php echo $text_disable; ?></option>
                        <option value="1"><?php echo $text_enable; ?></option>
                      <?php endif;?>
                    </select>
                  </div>
                </div>
                <div class="form-group">
                  <label class="col-sm-2 control-label" for="input-shipped-status"><span data-toggle="tooltip" title="<?php echo $help_shipped_status; ?>"><?php echo $entry_shipped_status; ?></span></label>
                  <div class="col-sm-10">
                    <select name="gdconfig_shipped_status_id" id="input-shipped-status" class="form-control">
                      <?php foreach ($order_statuses as $order_status) { ?>
                      <?php if ($order_status['order_status_id'] == $gdconfig_shipped_status_id) { ?>
                      <option value="<?php echo $order_status['order_status_id']; ?>" selected="selected"><?php echo $order_status['name']; ?></option>
                      <?php } else { ?>
                      <option value="<?php echo $order_status['order_status_id']; ?>"><?php echo $order_status['name']; ?></option>
                      <?php } ?>
                      <?php } ?>
                    </select>
                  </div>
                </div>
                <div class="form-group">
                  <label class="col-sm-2 control-label" for="input-cancelled-status"><span data-toggle="tooltip" title="<?php echo $help_cancelled_status; ?>"><?php echo $entry_cancelled_status; ?></span></label>
                  <div class="col-sm-10">
                    <select name="gdconfig_cancelled_status" id="input-cancelled-status" class="form-control">
                      <?php foreach ($order_statuses as $order_status) { ?>
                      <?php if ($order_status['order_status_id'] == $gdconfig_cancelled_status) { ?>
                      <option value="<?php echo $order_status['order_status_id']; ?>" selected="selected"><?php echo $order_status['name']; ?></option>
                      <?php } else { ?>
                      <option value="<?php echo $order_status['order_status_id']; ?>"><?php echo $order_status['name']; ?></option>
                      <?php } ?>
                      <?php } ?>
                    </select>
                  </div>
                </div>
                <div class="form-group">
                  <label class="col-sm-2 control-label" for="input-complete-time"><span data-toggle="tooltip" title="<?php echo $help_complete_time; ?>"><?php echo $entry_complete_time; ?></span></label>
                  <div class="col-sm-10">
                    <input type="text" name="gdconfig_complete_time" value="<?php echo $gdconfig_complete_time; ?>" placeholder="<?php echo $entry_complete_time; ?>" id="input-complete-time" class="form-control" />
                  </div>
                </div>
                <div class="form-group">
                  <label class="col-sm-2 control-label" for="input-unpaid-time"><span data-toggle="tooltip" title="<?php echo $help_unpaid_time; ?>"><?php echo $entry_unpaid_time; ?></span></label>
                  <div class="col-sm-10">
                    <input type="text" name="gdconfig_unpaid_time" value="<?php echo $gdconfig_unpaid_time; ?>" placeholder="<?php echo $entry_unpaid_time; ?>" id="input-unpaid-time" class="form-control" />
                  </div>
                </div>
                <div class="form-group">
                  <label class="col-sm-2 control-label"><span data-toggle="tooltip" title="<?php echo $help_image_quick_upload_mode; ?>"><?php echo $entry_image_quick_upload_mode; ?></span></label>
                  <div class="col-sm-10">
                    <label class="radio-inline">
                      <?php if ($gdconfig_image_quick_upload_mode) { ?>
                      <input type="radio" name="gdconfig_image_quick_upload_mode" value="1" checked="checked" />
                      <?php echo $text_yes; ?>
                      <?php } else { ?>
                      <input type="radio" name="gdconfig_image_quick_upload_mode" value="1" />
                      <?php echo $text_yes; ?>
                      <?php } ?>
                    </label>
                    <label class="radio-inline">
                      <?php if (!$gdconfig_image_quick_upload_mode) { ?>
                      <input type="radio" name="gdconfig_image_quick_upload_mode" value="0" checked="checked" />
                      <?php echo $text_no; ?>
                      <?php } else { ?>
                      <input type="radio" name="gdconfig_image_quick_upload_mode" value="0" />
                      <?php echo $text_no; ?>
                      <?php } ?>
                    </label>
                  </div>
                </div>
              </fieldset>
            </div>

          </div>
        </form>
      </div>
    </div>
  </div>
</div>
<?php echo $footer; ?>
